<script setup lang="ts" name="c-page">
interface Props {
    loading: boolean;
}

const props = withDefaults(defineProps<Props>(), {
    loading: false
});
</script>

<template>
    <div v-if="props.loading" class="loading-animation"></div>
    <slot v-else></slot>
</template>

<style lang="less" scoped>
.loading-animation {
    position: absolute;
    top: 40%;
    left: 45%;
}
</style>
